
/**   
*    
* ��Ŀ��ƣ�a_yongan   
* ����ƣ�UserStatEnum   
* ��������   
* �����ˣ�liubo   
* ����ʱ�䣺2018��5��30�� ����9:11:48    
* �޸�ʱ�䣺2018��5��30�� ����9:11:48   
* �޸ı�ע��   
* @version    
*    
*/
package com.yongan.user.enums;


/**
 * @author liubo
 *
 */
public enum UserStatEnum {

	SUCCESS(1,"操作成功"),
    END(0,"待定"),
    FAILED(-1,"操作失败"),
    INNER_ERROR(-2,"系统异常"),
    DATE_REWRITE(-3,"数据篡改"),
	DEPT_FAILED(-4,"该部门下含有子部门，无法删除");
	
	private int state;
    private String info;
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
    public static UserStatEnum stateOf(int index)
    {
        for (UserStatEnum state : values())
        {
            if (state.getState()==index)
            {
                return state;
            }
        }
        return null;
    }
    UserStatEnum(int state, String info) {
        this.state = state;
        this.info = info;
    }
}
